﻿using System;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;

namespace VXCompany.SilverlightLogging.MVVM.Models.Stores
{
	/// <summary>
	/// A memory based (fallback) store for when Isolated Storage is not available.
	/// </summary>
	public class MemoryStore : Store
	{
		/// <summary>
		/// Creates new instance.
		/// </summary>
		public MemoryStore()
		{
			Initialize();	
		}
		/// <summary>
		/// Messages are not persisted.
		/// </summary>
		protected override void SaveImpl()
		{			
		}

		/// <summary>
		/// Returns all messages.
		/// </summary>
		/// <returns></returns>
		protected override System.Collections.Generic.IEnumerable<ServiceProxy.ExceptionMessage> GetItemsFromStore()
		{
			return InnerList;
		}

		/// <summary>
		/// Initializes Memory Store.
		/// </summary>
		protected override void InitializeImpl()
		{			
		}
	}
}
